function index_createAdmin(){
	var name = $("#admin_adminCode").val().trim();
	var empId = $("#admin_empId").val();
	var empName = $("#admin_empName").val();
	var pwd1 = $("#admin_pwd1").val();
	var pwd2 = $("#admin_pwd2").val();
	var roll = $("input:radio:checked").val();
	if(empId ==""){
		$("#createAdmin_error").html("员工号不能为空!");
		return;
	}
	if(empId.length>6){
		$("#createAdmin_error").html("员工号不正确!");
		return;
	}
	if(empName ==""){
		$("#createAdmin_error").html("员工姓名不能为空!");
		return;
	}
	if(name ==""){
		$("#createAdmin_error").html("用户名不能为空!");
		return;
	}
	if(pwd1 == ""){
		$("#createAdmin_error").html("密码不能为空!");
		return;
	}
	if(pwd1.length<6){
		$("#createAdmin_error").html("密码不能小于6位!");
		return;
	}
	if(pwd1!=pwd2){
		$("#createAdmin_error").html("两次密码输入不一致!");
		return;
	}
	$.ajax({
		url : "system/createAdmin.sls",
		type : "post",
		data : {
			"name":name,"empId":empId,"empName":empName,"pwd":pwd1,"roll":roll
		},
		dataType : "json",
		success : function(result){
			if(result.status == 0){
				$("#createAdmin_error").html("用户创建成功!");
				setTimeout(function(){window.location.href="toSystem.sls";},1000);
			}else if(result.status == 2){//用户名已存在
				$("#createAdmin_error").html(result.msg);
			}else if(result.status == 3){//员工号输入有误
				$("#createAdmin_error").html(result.msg);
			}else if(result.status == 4){//员工号不存在
				$("#createAdmin_error").html(result.msg);
			}else if(result.status == 5){//登录超时
				$("#createAdmin_error").html(result.msg);
			}else if(result.status == 6){//权限不够,管理员不能创建管理员
				$("#createAdmin_error").html(result.msg);
			}else if(result.status == 7){//限制一个员工一个帐号
				$("#createAdmin_error").html(result.msg);
			}else {
				$("#createAdmin_error").html("系统出错!");
			}
		},
		error : function (){
			window.location.href="error.sls";
		}
	});
}